<?php
  // Тестовый коммент, для svn
  function __autoload($class_name)
  {
    if (preg_match('/^[A-Z][a-z]+$/', $class_name, $hm) || $class_name ==='ActionControllerFabric') {
      include __DIR__.'/classes/core/'.$class_name.'.class.php';
      return true;
    }
    preg_match('/[A-Z][a-z]+$/', $class_name, $type);
    switch ($type[0]) {
      case 'Model':
        include __DIR__.'/classes/models/'.$class_name.'.class.php';
        break;
      case 'Action':
        include __DIR__.'/classes/models/'.$class_name.'.class.php';
        break;
      case 'Mapper':
        include __DIR__.'/classes/mappers/'.$class_name.'.class.php';
        break;
      case 'Controller':
        include __DIR__.'/classes/controllers/'.$class_name.'.class.php';
        break;
      default:
        include __DIR__.'/classes/core/support/'.$class_name.'.class.php';
        break;
    }
  }
  $frontController = FrontController::instance();
  $frontController->run();
?>